package cn.iocoder.yudao.module.call.dal.mysql.ivrinput;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.call.dal.dataobject.ivrinput.IvrInputDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.call.controller.admin.ivrinput.vo.*;

/**
 * ivr-用户输入记录-收号 Mapper
 *
 * @author 数创万维
 */
@Mapper
public interface IvrInputMapper extends BaseMapperX<IvrInputDO> {

    default PageResult<IvrInputDO> selectPage(IvrInputPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<IvrInputDO>()
                .eqIfPresent(IvrInputDO::getGroupId, reqVO.getGroupId())
                .eqIfPresent(IvrInputDO::getFlowId, reqVO.getFlowId())
                .eqIfPresent(IvrInputDO::getNodeId, reqVO.getNodeId())
                .eqIfPresent(IvrInputDO::getCallId, reqVO.getCallId())
                .eqIfPresent(IvrInputDO::getContent, reqVO.getContent())
                .betweenIfPresent(IvrInputDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(IvrInputDO::getId));
    }

}